Added better error handling
Reformatted code
Updated version to 1.0.0