Refactored for more generic code.

This patch add the following

1) Adds ability to parse Meta-Data, for example using pagination.

2) Moved more code to a single class and made specialization compact.

3) Refactored some files so generic code could be used more easily