Cleaned up some code phase A working