Adding Automatic boxing section and small refactor