Premature end-line bug patched. Need cleaner fix
Cleaned up code