Initial Draft. Working further on bugs and improvements.