Removed unused arguments and added typehints in the container building