Added global array for posts. Improved Unit Tests and did some code cleanup.