Finally shortened the init function; separated prototypes a little cleaner