Refactoring & closes #4.