got rid of uneccesary global objects