Correcting some errors and creating the abstaction class Action