added Wextra and fixed warnings
fixed constructor