Finishing the base logic

This commit finish the base logic. Now and so on, the logic needs to be
created based on the needs.