decoder code cleanup and pointing optimixation