abstact classes; clean up code