Add some subscription functionality and bug fixes