Updating Stack to make it comply with the lastest coding conventions. Adding stack tests.