1st version with major functions functional.