Restructure code into multiple sources.

Not sure if it is better, just lets see how it rolls