Add logging and update requirements. Minor bug fixes