First functional version
Added files from master