Updated index to fit webpack
Moved all the things to modules