Imported from TEONITE repository