Added editor files and refactored code.
Fixed bug where line indices array would be way wrong
Moved all ncurses-related code to editor files. Added basic text rendering method.