Added tests for paste_data_images and fixed some code formatting.
Fixed some UI bugs and broken unit tests.