Cleaned up code, have yet to compile and test module