TOTAL OVERHAUL

!!! UNTESTED !!!

Removed a bunch of crap, merged files into one, improved all functions
and overall logic.
Needs to be tested.