Namespace support added, truncate implemented, data array accepted to construct, code simplified
Better readability