Formatting And Data Cleanup

- trim() applied to data applied to and from db
- modified boolean condition statements