Small code reorganization, writing README file