Updated source code and documentation