Finishing the code and adapting comments and README