Working on making this better

Optimized some functions. Gotta work on putting it all together. May
take a while though with work starting for the summer.