Removed unused code
Added trim test