Introduced monitoring and several small improvements