nearly fixed all the initial problems (actually committing)