Bitmap: added namespace wrapper and cleaned code