Refactored and organized code. Created System header that contians most of the function defines