re-organising data structures

first pass at removing custom DB stuff and replacing with WP post_meta
entries