removed garbage, sundry optimization changes