Added config and api service, cleaned  shit up and commented a lot