Moved convenience macros to core. Added a -main