Organized subroutines (hopefully) in a working manner.