reorganized includes, added versioning macros, update rev