Fixed, remove unused connections and code clean up