Bug fixes, added service functions