added edit/delete control plus cleaned up code