Added startup and close as macros