Improved code. Still few kinks left. Not playable.