added a bunch of files. added some general functions and macros. more config stuff.