Performed a proper refactoring rather than the last sloppy commit.