Adding defapi macro, other refactorings