LOTS of changes made here. Shouldve committed more frequently