Fixing errors and polishing the final source code