Fixed bugs with error handling in webapp.
Added support for datalayer.ResultSet to return total number of matching records.