Moves to make it more modular for npm