Minor changes
Merge latex and added some functions