Clean up as_ implementation