Ensuring valid slice syntax.

Ensuring that numbers are followed by the appropriate token.
Closes #17