fixed parser bug
removed unused functions