Added the Logic into each component, removed the "package" statement at the top