Refactored some primitives