Trying to modularize some things