More Bug fixing, still WIP
More Bug fixing

The map for funtions still pending