CLEANUP: use vectors instead of plain arrays. Closes #21