Sorted out readme and added error throw on erroneous values.