cleaned up code, removed unnecessary vars