[Unit Testing] Added several tests.
[Code Clean] Dead code elimination.
[Code Clean] Removed no longer used file.
[Aux] Better contract.
[CI] Make travis happy.