Made changes to enable saving with dwr