Got tail -n type functionality working now
Still needs more testing...