Rearrangement of template code

Also fixes a bug with activity pagination and already-rated reviews

See #26. Props imath