Added image resources and some code improvements