fixed bug in new and edit
renamed classes for consistency