Made it a whole lot more modular, updated the documentation