Added some error handling.
Added close button on imgbit.