Properly serialize the view

Fix #14