Improved constructor functions and index layout