Improved code & documentation