Fix errors in lce

Fix discard() to work for all sizes
Remove unused parameter