Major revision all over the code

Many more methods now implemented