Move initialization to the bottom.
Remove closing PHP tag.
Updated header comments.
Updated comments.
Updated programming style.
Updated to JSON based manifest file.