Major update to the source code