Moved parse parameters code to templates and added partial object validation.