Fixed configure and added some new functions