Improved comments and solved source-sink declaration bug