Some efficiency changes