Cleanup mostly, fixing variables and such