Additional callback added
Some comments added
Code improvements