First draft of running code! Its up for optimization and refactoring!