cleaned up code, removed unnecessary declarations