Justify input handling, Add terminal resize handling

Closes #1