necessary cleanup and non angular version reconnect handling implemented, bumped to 0.5.1