Checkin of initial fully working version