Fixed issue #16 and removed all compiler warnings.