Added disposal of bitmaps and swapped func return