fix confusing bits size generation
removed useless module includes
optimize output