Added main functionality
Added example of usage for library