refactored + edit

refactrored out obd part and added edit view support