cleaning up code smells in onset