Added DB function to return leveled arrays(1d). Formatting changes on multiple pages. Removed VALID_PAGE array and started to use readability of the target file. Multiple changes to PWApi functions