Updated some things. Control flow and such.