Cleaned Up Resources

Code to display icons is now more robust
Test code for resources is more realistic
Various little bugs