Fixed some minor issues and cleanup.