Fixed README formatting fault; minor code refactoring.