Boundaries alignment fix. Few type changes.