Complete overhaul and documentation