first pass on using a serializer
Move rails patches to common location
Fix typo