fixed a bug in alignDataToRibbon(...)

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
some minor changes and tweeks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>