Cleaning up and making stable version, also binding events for further computations