major code cleaned up, setting up resources