Fixed: Several warnings and errors