rewrote module system

allows for easier module creation