Major code rewrite and post highlighting added