Started fleshing out final functionality