refactor and ready for bower