Added frontend pagination

Added pagination support,
+ Rewrite compile bug solved