Added BitMapStream class and reverted mainactivity