Tidy up
moved serializer into its own file