indexing starts at 0, updated replaceLine function accordingly. Now works
added comments
removed outdated comment about indexing error
Merge pull request #2 from mioalter/dev

Indexing and editing work!