Cleaned up minor bits of code