Updated search template, added pagination functions, header bugfix