diff --git a/imports/accounts-ui.jsx b/imports/accounts-ui.jsx
new file mode 100644
index 0000000..a6d6e57
--- /dev/null
+++ b/imports/accounts-ui.jsx
@@ -0,0 +1,201 @@
+import React from 'react';
+import { _ } from 'meteor/underscore';
+import { Accounts, STATES } from 'meteor/std:accounts-ui';
+
+/**
+ * Form.propTypes = {
+ * fields: React.PropTypes.object.isRequired,
+ * buttons: React.PropTypes.object.isRequired,
+ * error: React.PropTypes.string,
+ * ready: React.PropTypes.bool
+ * };
+ */
+class Form extends Accounts.ui.Form {
+ render() {
+ const {
+ hasPasswordService,
+ oauthServices,
+ fields,
+ buttons,
+ error,
+ message,
+ ready = true,
+ className,
+ formState
+ } = this.props;
+ return (
+
+ );
+ }
+}
+
+class Buttons extends Accounts.ui.Buttons {}
+class Button extends Accounts.ui.Button {
+ render() {
+ const {
+ label,
+ href = null,
+ type,
+ disabled = false,
+ onClick,
+ className,
+ icon
+ } = this.props;
+ return type == 'link' ? (
+ { icon ? ( ) : null }{ label }
+ ) : (
+ { icon ? ( ) : null }{ label }
+ );
+ }
+}
+class Fields extends Accounts.ui.Fields {
+ render () {
+ let { fields = {}, className = "field" } = this.props;
+ return (
+
+ {Object.keys(fields).map((id, i) =>
+
+ )}
+
+ );
+ }
+}
+class Field extends Accounts.ui.Field {
+ render() {
+ const {
+ id,
+ hint,
+ label,
+ type = 'text',
+ onChange,
+ required = false,
+ className,
+ defaultValue = ""
+ } = this.props;
+ const { mount = true } = this.state;
+ return mount ? (
+
+ ) : null;
+ }
+}
+export class PasswordOrService extends Accounts.ui.PasswordOrService {
+ render() {
+ let { className, style = {} } = this.props;
+ let { hasPasswordService, services } = this.state;
+ labels = services;
+ if (services.length > 2) {
+ labels = [];
+ }
+
+ if (hasPasswordService && services.length > 0) {
+ return (
+
+ { `${T9n.get('orUse')} ${ labels.join(' / ') }` }
+
+ );
+ }
+ return null;
+ }
+}
+class SocialButtons extends Accounts.ui.SocialButtons {
+ render() {
+ let { oauthServices = {}, className = "social-buttons" } = this.props;
+ return(
+
+ {Object.keys(oauthServices).map((id, i) => {
+ var mapObj = {
+ google:"google plus",
+ "meteor-developer": ""
+ };
+ let serviceClass = id.replace(/google|meteor\-developer/gi, (matched) => {
+ return mapObj[matched];
+ });
+ return (
+
+ );
+ })}
+
+ );
+ }
+}
+class FormMessage extends Accounts.ui.FormMessage {}
+// Notice! Accounts.ui.LoginForm manages all state logic at the moment, so avoid
+// overwriting this one, but have a look at it and learn how it works. And pull
+// requests altering how that works are welcome.
+
+// Alter provided default unstyled UI.
+Accounts.ui.Form = Form;
+Accounts.ui.Buttons = Buttons;
+Accounts.ui.Button = Button;
+Accounts.ui.Fields = Fields;
+Accounts.ui.Field = Field;
+Accounts.ui.PasswordOrService = PasswordOrService;
+Accounts.ui.SocialButtons = SocialButtons;
+Accounts.ui.FormMessage = FormMessage;
+
+// Export the themed version.
+export { Accounts, STATES };
+export default Accounts;
diff --git a/main.jsx b/main.jsx
index a6d6e57..f85bdc9 100644
--- a/main.jsx
+++ b/main.jsx
@@ -1,201 +1,7 @@
-import React from 'react';
-import { _ } from 'meteor/underscore';
-import { Accounts, STATES } from 'meteor/std:accounts-ui';
-
-/**
- * Form.propTypes = {
- * fields: React.PropTypes.object.isRequired,
- * buttons: React.PropTypes.object.isRequired,
- * error: React.PropTypes.string,
- * ready: React.PropTypes.bool
- * };
- */
-class Form extends Accounts.ui.Form {
- render() {
- const {
- hasPasswordService,
- oauthServices,
- fields,
- buttons,
- error,
- message,
- ready = true,
- className,
- formState
- } = this.props;
- return (
-
- );
- }
-}
-
-class Buttons extends Accounts.ui.Buttons {}
-class Button extends Accounts.ui.Button {
- render() {
- const {
- label,
- href = null,
- type,
- disabled = false,
- onClick,
- className,
- icon
- } = this.props;
- return type == 'link' ? (
- { icon ? ( ) : null }{ label }
- ) : (
- { icon ? ( ) : null }{ label }
- );
- }
-}
-class Fields extends Accounts.ui.Fields {
- render () {
- let { fields = {}, className = "field" } = this.props;
- return (
-
- {Object.keys(fields).map((id, i) =>
-
- )}
-
- );
- }
-}
-class Field extends Accounts.ui.Field {
- render() {
- const {
- id,
- hint,
- label,
- type = 'text',
- onChange,
- required = false,
- className,
- defaultValue = ""
- } = this.props;
- const { mount = true } = this.state;
- return mount ? (
-
- ) : null;
- }
-}
-export class PasswordOrService extends Accounts.ui.PasswordOrService {
- render() {
- let { className, style = {} } = this.props;
- let { hasPasswordService, services } = this.state;
- labels = services;
- if (services.length > 2) {
- labels = [];
- }
-
- if (hasPasswordService && services.length > 0) {
- return (
-
- { `${T9n.get('orUse')} ${ labels.join(' / ') }` }
-
- );
- }
- return null;
- }
-}
-class SocialButtons extends Accounts.ui.SocialButtons {
- render() {
- let { oauthServices = {}, className = "social-buttons" } = this.props;
- return(
-
- {Object.keys(oauthServices).map((id, i) => {
- var mapObj = {
- google:"google plus",
- "meteor-developer": ""
- };
- let serviceClass = id.replace(/google|meteor\-developer/gi, (matched) => {
- return mapObj[matched];
- });
- return (
-
- );
- })}
-
- );
- }
-}
-class FormMessage extends Accounts.ui.FormMessage {}
-// Notice! Accounts.ui.LoginForm manages all state logic at the moment, so avoid
-// overwriting this one, but have a look at it and learn how it works. And pull
-// requests altering how that works are welcome.
-
-// Alter provided default unstyled UI.
-Accounts.ui.Form = Form;
-Accounts.ui.Buttons = Buttons;
-Accounts.ui.Button = Button;
-Accounts.ui.Fields = Fields;
-Accounts.ui.Field = Field;
-Accounts.ui.PasswordOrService = PasswordOrService;
-Accounts.ui.SocialButtons = SocialButtons;
-Accounts.ui.FormMessage = FormMessage;
+import { Accounts, STATES } from './imports/accounts-ui';
// Export the themed version.
-export { Accounts, STATES };
-export default Accounts;
+export {
+ Accounts,
+ STATES,
+};