Basic data structure and algorithms implimentation