Implemented & refactored. (halfway)