Did some refactoring, removed unnessecary elses