Refactorying. Working on #2.