Cleanup + added documentation