Added apache license. Added comments for the general purpose of each
file.