Drastic overhaul; removed comments, organised