Added readme; removed unnecessary return from flatten()