Added semantic features and some fixes