Updated compilation flags, removed unused variables