Added 'maxDuration' attribute
Added comments + minor fixes