Bug fixes
Added new fuction
Merget branches