Refactoring

Removed some more code by using define-simple-macro