improvements, optimizations of psd parser