Removed unnecessary branching
Definition oriented tests and minor fixes