Separated responsibility and cleaned up a bit