Added branch filtering, cleanup