Adding applicative functor laws.
- Also did a slight refactor to make it easier to read.