compile with more warnings and cleanup code a bit