Revert "Standardize and use functions"
did not test code - Doesnt compile nor work.
- Rhcp
This reverts commit dca2974ceaa2f351912de29eb7cd13c4490774d4.