Removes setting class and cleans up code.