Edit feature

A lot of changes here. Not all of them are relate to the edit feature. Read commits for more info.

resolves #4