Made naming changes. Fixed some minor bugs.