Update 1.2a
Update 1.2b
Reimplemented Main for testing purposes.