Refactored a bit of service and types. Fixed headers