3d-viewer: code cleaning; bitmap2component: minor fix and code cleanup