Fixes small bugs.
Polishes program entry point.