Revert "Revert "Added old code from earlier development""

This reverts commit 26afd8087d6121d43b99f4003493cf2f8d81d8ca.
Reverted
Reverted
Reverted
Reverted