Hi @pedromtelho,
You may want to take a step back and start with a simple example: Simple ERC20 Crowdsale.
I would suggest extending OpenZeppelin Contracts Crowdsales rather than creating your own. This would also make the code much easier to read (and for your audits, audit). https://docs.openzeppelin.com/contracts/2.x/crowdsales