Moving all logic into bashrc