Cleaned up code.
Added different way to create bitmap.