Code Cleanup

Removed unused resources. L Preview compatibility added. Fixed some
memory leaks.