Restructured code layout to better support tests.
Increased the warning strictness for GCC.
Fixed various warnings.
Fixed various warnings.