brought back the legacy support. Refactored to have macros more independently. Somehow locking is not working right now...