Made some stuff more object-oriental