Added number of results to output
Added logic to parse flags + switched page to a flag
Limit flag functions properly