BT Coding Exercise

Some minor improvements