Major overhaul, migrated from Amazon svn repo
	modified:   src/trim.c