Fixed Compile Errors
Updated with testing errors and some refactoring
Currently functional