Added code and documentation, updated README