Rewrote a lot of code. Added Config.