Reverted back changes to the service registries
Fixed some issues with file locks not closed properly.