Made a lot of changes, have not tried compiling