Nicer import handling for standalone and module use