Refactors code for better consistency  and bumps version to 2.1.0.