Removed most of malloc()s, now fixed stack memory is used. Adding a new shared header file.