Shortened Code To 421 Lines

This will shorten your code by A LOT (Down from ~1000 to 421 lines to be exact) and will have absolutely no effect on how the plugin functions.  This will help you a lot in the future for any updates you may come out with.