Cleaned up main: removed unused subroutine