Removed temp code, minor fixes