Started work on macros and db functions.